package com.books.mapper.back;

import com.books.model.entity.back.Back;
import org.apache.ibatis.annotations.Delete;
import org.apache.ibatis.annotations.Insert;
import org.apache.ibatis.annotations.Mapper;
import org.apache.ibatis.annotations.Select;

import java.util.List;

/**
 * @Author 饿熊的咆哮
 * @Date 2021/10/15 9:40
 * @Version 1.0
 */
@Mapper
public interface BackMapper {
    @Select("select * from back")
    List<Back> findAllBack();

    @Delete("delete from back where order_list_id=#{orderListId}")
    void delByBackId(String orderListId);

    @Insert("insert into back values(null,#{peopleId},#{orderListId},#{backTime},#{backReason})")
    void addBack(Back back);
}
